#include "edgedetector.h"
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <iostream>
#include <stdio.h>

using namespace std;
using namespace cv;

EdgeDetector::EdgeDetector()
{
}


void EdgeDetector::detect ( Mat frame )
{
    Mat src_gray;

    baseImage = frame;
    cvtColor( baseImage, src_gray, CV_BGR2GRAY );

    blur( src_gray, intermediateImage, Size(3,3) );

    Canny( intermediateImage, intermediateImage, lowThreshold, lowThreshold*ratio, kernel_size );

    endImage = Scalar::all(0);

    baseImage.copyTo( endImage, intermediateImage);
}
